Skip to content

remove _from_reload from module name to avoid confusion#6033

Merged
michaellee1019 merged 1 commit into
mainfrom
ml/from-reload-renaming
May 22, 2026
Merged

remove _from_reload from module name to avoid confusion#6033
michaellee1019 merged 1 commit into
mainfrom
ml/from-reload-renaming

Conversation

@michaellee1019
Copy link
Copy Markdown
Member

I've heard that having the module name be generated with "from_reload" is confusing after hot reloading is turned off. The machine's logs will still reference the module name string after the module has been switched to a registry semver version, making it seem like the module is still running the reloaded version.

@viambot viambot added the safe to test This pull request is marked safe to test from a trusted zone label May 21, 2026
Copy link
Copy Markdown
Member

@dgottlieb dgottlieb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm assuming the consequences of this are understood -- but let me know if I should be looking closer.

Comment thread cli/module_reload.go
// (or "<orgID>:<moduleName>" if no namespace is set) into a name suitable for
// adding to a robot config, i.e. "<namespace>_<moduleName>" or "<orgID>_<moduleName>".
// TODO(APP-4019): remove this logic after registry modules can have local ExecPath.
func localizeModuleID(moduleID string) string {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not entirely privy to the callers of this and how this affects the robot config we generate. Specifically if removing _from_reload results in module name collisions we wouldn't expect before. Do you need any additional vetting from me that this is kosher?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see your concern, but i think its fine. The app, rdk, and cli are resilient on changes in the name field of the JSON. The uniqueness and searching is on the module_id field and not the name field for modules https://github.com/viamrobotics/rdk/blob/main/cli/module_reload.go#L413. The behavior for modules is different than other areas of the config that treat name as needing to be unique. It is also currently allowed that you can change name field in app and reload will still find the module, so I'm not concerned about this. Also the RDK allows multiple modules with the same name, but not with the same moduleID (I just tested to reaffirm my understanding).

@michaellee1019 michaellee1019 merged commit de9f41e into main May 22, 2026
30 checks passed
@michaellee1019 michaellee1019 deleted the ml/from-reload-renaming branch May 22, 2026 23:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to test This pull request is marked safe to test from a trusted zone

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants